package org.yoshiori.lingr.api;

import java.util.Date;

import org.yoshiori.lingr.api.vo.ClientType;
import org.yoshiori.lingr.api.vo.MessageType;
import org.yoshiori.lingr.api.vo.Source;

/**
 * @author yoshiori
 * 
 */
public class Message {

	private String id;

	private MessageType type;

	private String occupantId;

	private String nickname;

	private Source source;

	private ClientType clientType;

	private String iconURL;

	private Date timestamp;

	private String text;

	/**
	 * @param id
	 * @param type
	 * @param occupantId
	 * @param nickname
	 * @param source
	 * @param clientType
	 * @param iconURL
	 * @param timestamp
	 * @param text
	 */
	public Message(String id, MessageType type, String occupantId,
			String nickname, Source source, ClientType clientType,
			String iconURL, Date timstamp, String text) {
		this.id = id;
		this.type = type;
		this.occupantId = occupantId;
		this.nickname = nickname;
		this.source = source;
		this.clientType = clientType;
		this.iconURL = iconURL;
		this.timestamp = (Date) timstamp.clone();
		this.text = text;
	}

	/**
	 * 
	 */
	public Message() {
	}

	/**
	 * @return the clientType
	 */
	public ClientType getClientType() {
		return clientType;
	}

	/**
	 * @param clientType
	 *            the clientType to set
	 */
	public void setClientType(ClientType clientType) {
		this.clientType = clientType;
	}

	/**
	 * @return the iconURL
	 */
	public String getIconURL() {
		return iconURL;
	}

	/**
	 * @param url
	 *            the iconURL to set
	 */
	public void setIconURL(String url) {
		this.iconURL = url;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the nickname
	 */
	public String getNickname() {
		return nickname;
	}

	/**
	 * @param nickname
	 *            the nickname to set
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	/**
	 * @return the occupantId
	 */
	public String getOccupantId() {
		return occupantId;
	}

	/**
	 * @param occupantId
	 *            the occupantId to set
	 */
	public void setOccupantId(String occupantId) {
		this.occupantId = occupantId;
	}

	/**
	 * @return the source
	 */
	public Source getSource() {
		return source;
	}

	/**
	 * @param source
	 *            the source to set
	 */
	public void setSource(Source source) {
		this.source = source;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text
	 *            the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the timestamp
	 */
	public Date getTimestamp() {
		return (Date) timestamp.clone();
	}

	/**
	 * @param timestamp
	 *            the timestamp to set
	 */
	public void setTimestamp(Date timstamp) {
		this.timestamp = (Date) timstamp.clone();
	}

	/**
	 * @return the type
	 */
	public MessageType getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(MessageType type) {
		this.type = type;
	}
}
